|
color10 2.2.1
|
Functions | |
| void | color10_cfg_setup (color10_cfg_t *cfg) |
| Config Object Initialization function. | |
| COLOR10_RETVAL | color10_init (color10_t *ctx, color10_cfg_t *cfg) |
| Initialization function. | |
| void | color10_generic_write (color10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
| Generic write function. | |
| uint16_t | color10_generic_read (color10_t *ctx, uint8_t cmd_addr) |
| Generic read function. | |
| void | color10_config (color10_t *ctx, uint16_t cfg_data) |
| Configuration function. | |
| uint8_t | color10_get_id (color10_t *ctx) |
| ID retrieval function. | |
| float | color10_read_color_ratio (color10_t *ctx, uint8_t color_cmd_reg) |
| Color ratio function. | |
| float | color10_get_color_value (color10_t *ctx) |
| Color value function. | |
| uint8_t | color10_get_color (float color_value) |
| Color retrieval function. | |
| void color10_cfg_setup | ( | color10_cfg_t * | cfg | ) |
Config Object Initialization function.
| cfg | Click configuration structure. |
@description This function initializes Click configuration structure to init state.
| void color10_config | ( | color10_t * | ctx, |
| uint16_t | cfg_data ) |
Configuration function.
| ctx | Click object. |
| cfg_data | Configuration data. |
@description This function configures the Click according to the config data.
| uint16_t color10_generic_read | ( | color10_t * | ctx, |
| uint8_t | cmd_addr ) |
Generic read function.
| ctx | Click object. |
| cmd_addr | Command address. |
@description This function reads data from the desired register.
| void color10_generic_write | ( | color10_t * | ctx, |
| uint8_t | reg, | ||
| uint8_t * | data_buf, | ||
| uint8_t | len ) |
Generic write function.
| ctx | Click object. |
| reg | Register address. |
| data_buf | Data buf to be written. |
| len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
| uint8_t color10_get_color | ( | float | color_value | ) |
Color retrieval function.
| color_value | Color value |
@description This function identifies the color using the color value.
| float color10_get_color_value | ( | color10_t * | ctx | ) |
Color value function.
| ctx | Click object. |
@description This function calculates the color value.
| uint8_t color10_get_id | ( | color10_t * | ctx | ) |
ID retrieval function.
| ctx | Click object. |
@description This function returns the ID.
| COLOR10_RETVAL color10_init | ( | color10_t * | ctx, |
| color10_cfg_t * | cfg ) |
Initialization function.
| ctx | Click object. |
| cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this Click.
| float color10_read_color_ratio | ( | color10_t * | ctx, |
| uint8_t | color_cmd_reg ) |
Color ratio function.
| ctx | Click object. |
| color_cmd_reg | Color command register. |
@description This function reads the color ratio from given register.